/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package util.file;

/*
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
*/

/**
 *
 * @author Rdelacruz
 */
public class FileUtilJava7 {

    /*
   //http://stackoverflow.com/questions/3935791/find-and-replace-words-lines-in-a-file
    public static void replaceInFile_EnJava7oMas(String pathname, String expresionRegular, String reemplazo) throws IOException {
        Path path = Paths.get(pathname);
        Charset charset = StandardCharsets.UTF_8;

        String content = new String(Files.readAllBytes(path), charset);//Java 7: Files.readAllBytes
        content = content.replaceAll(expresionRegular, reemplazo);
        Files.write(path, content.getBytes(charset));
    }
    */
}
